package com.sherllinhe.business.req;

import com.sherllinhe.common.req.PageReq;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.Objects;

@Data
public class DailyTrainTicketQueryReq extends PageReq {
    //private Long memberId;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date date;
    private String trainCode;
    private String end;
    private String start;

    @Override
    public boolean equals(Object o) {
        if(this == o)return true;
        if (!(o instanceof DailyTrainTicketQueryReq that))return false;
        return Objects.equals(date, that.date) && Objects.equals(trainCode, that.trainCode) && Objects.equals(end, that.end) && Objects.equals(start, that.start) && Objects.equals(getPage(), that.getPage()) && Objects.equals(getSize(), that.getSize());
    }

    @Override
    public int hashCode() {
        return Objects.hash(date, trainCode, end, start, getPage(), getSize());
    }
}
